xen/arm: Introduce a initcall to update cpu_hwcaps by serror_op
authorWei Chen <Wei.Chen@arm.com>
Wed, 5 Apr 2017 09:09:10 +0000 (17:09 +0800)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 5 Apr 2017 19:12:24 +0000 (12:12 -0700)
commit4e1e4a9848518ab98aa7c309a46874bc343a8e75
treecaf4cac32f5aad9df04fd229acfce2287d1fb900
parentbe3a53a1cc1da732bbb1ec83157f1572d78e29f4
xen/arm: Introduce a initcall to update cpu_hwcaps by serror_op

In the later patches of this series, we want to use the alternative
patching framework to avoid synchronizing serror_op in every entries
and exits. So we define a new cpu feature "SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT"
for serror_op. When serror_op is not equal to SERROR_DIVERSE, this
feature will be set to cpu_hwcaps.

Currently, the default serror_op is SERROR_DIVERSE, if we want to
change the serror_op value we have to place the serror parameter
in command line. It seems no problem to update cpu_hwcaps directly
in the serror parameter parsing function.

While the default option will be diverse today, this may change in the
future. So we introduce this initcall to guarantee the cpu_hwcaps can be
updated no matter the serror parameter is placed in the command line
or not.

Signed-off-by: Wei Chen <Wei.Chen@arm.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/traps.c
xen/include/asm-arm/cpufeature.h